package com.catemanagement.model;

import java.io.Serializable;


/**
 * The Class BillMenu.
 */
public class BillMenu implements Serializable {

    /** The Constant serialVersionUID. */
    private static final long serialVersionUID = -4512107400504144189L;

    /** The id. */
    private Long id;

    /** The name. */
    private String name;

    /** The unit. */
    private String unit;

    /** The unit price. */
    private Float unitPrice;

    /** The count. */
    private Float count = 0.0F;

    /** The menu id. */
    private Long menuId;

    /** The bill id. */
    private Long billId;

    /**
     * Instantiates a new bill menu.
     */
    public BillMenu() {

    }

    /**
     * Instantiates a new bill menu.
     * 
     * @param menu the menu
     */
    public BillMenu(Menu menu) {
        this.name = menu.getName();
        this.unit = menu.getUnit();
        this.unitPrice = menu.getUnitPrice();
        this.menuId = menu.getId();
    }

    /**
     * Instantiates a new bill menu.
     * 
     * @param id the id
     * @param name the name
     * @param unit the unit
     * @param unitPrice the unit price
     */
    public BillMenu(Long id, String name, String unit, Float unitPrice) {
        this.id = id;
        this.name = name;
        this.unit = unit;
        this.unitPrice = unitPrice;
    }

    /**
     * Gets the id.
     * 
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * Sets the id.
     * 
     * @param id the new id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * Gets the name.
     * 
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the name.
     * 
     * @param name the new name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Gets the unit.
     * 
     * @return the unit
     */
    public String getUnit() {
        return unit;
    }

    /**
     * Sets the unit.
     * 
     * @param unit the new unit
     */
    public void setUnit(String unit) {
        this.unit = unit;
    }

    /**
     * Gets the unit price.
     * 
     * @return the unit price
     */
    public Float getUnitPrice() {
        return unitPrice;
    }

    /**
     * Sets the unit price.
     * 
     * @param unitPrice the new unit price
     */
    public void setUnitPrice(Float unitPrice) {
        this.unitPrice = unitPrice;
    }

    /**
     * Gets the count.
     * 
     * @return the count
     */
    public Float getCount() {
        return count;
    }

    /**
     * Sets the count.
     * 
     * @param count the new count
     */
    public void setCount(Float count) {
        this.count = count;
    }

    /**
     * Gets the price.
     * 
     * @return the price
     */
    public Float getPrice() {
        return unitPrice * count / 1.00f;
    }

    /**
     * Gets the menu id.
     * 
     * @return the menu id
     */
    public Long getMenuId() {
        return menuId;
    }

    /**
     * Sets the menu id.
     * 
     * @param menuId the new menu id
     */
    public void setMenuId(Long menuId) {
        this.menuId = menuId;
    }

    /**
     * Gets the bill id.
     * 
     * @return the bill id
     */
    public Long getBillId() {
        return billId;
    }

    /**
     * Sets the bill id.
     * 
     * @param billId the new bill id
     */
    public void setBillId(Long billId) {
        this.billId = billId;
    }

}
